Method and apparatus for block-based compression of light-field images

ABSTRACT

A method and apparatus for the block-based compression of light-field images. Light-field images may be preprocessed by a preprocessing module into a format that is compatible with the blocking scheme of a block-based compression technique, for example JPEG. The compression technique is then used to compress the preprocessed light-field images. The light-field preprocessing module reshapes the angular data in a captured light-field image into shapes compatible with the blocking scheme of the compression technique so that blocking artifacts of block-based compression are not introduced in the final compressed image. Embodiments may produce compressed 2D images for which no specific light-field image viewer is needed to preview the full light-field image. Full light-field information is contained in one compressed 2D image.

This application is a continuation of U.S. application Ser. No. 12/111,735, filed on Apr. 29, 2008 now U.S. Pat. No. 8,155,456, which is incorporated by reference herein in its entirety.

BACKGROUND Description of the Related Art

Conventional cameras fail to capture a large amount of optical information. In particular, a conventional camera does not capture information about the location on the aperture where different light rays enter the camera. During operation, a conventional digital camera captures a two-dimensional (2D) image representing a total amount of light that strikes each point on a photosensor within the camera. However, this 2D image contains no information about the directional distribution of the light that strikes the photosensor. Directional information at the pixels corresponds to locational information at the aperture.

In contrast, light-field cameras sample the four-dimensional (4D) optical phase space or light-field and in doing so capture information about the directional distribution of the light rays. This information captured by light-field cameras may be referred to as the light-field, the plenoptic function, or radiance. In computational photography, a light-field is a 4D record of all light rays in 3D. Radiance describes both spatial and angular information, and is defined as density of energy per unit of area per unit of stereo angle (in radians). A light-field camera captures radiance; therefore, light-field images originally taken out-of-focus may be refocused, noise may be reduced, viewpoints may be changed, and other light-field effects may be achieved.

Light-fields may be captured with a conventional camera. In one conventional method, M×N images of a scene are captured from different positions with a conventional camera. If, for example, 8×8 images are captured from 64 different positions, 64 images are produced. The pixel from each position (i,j) in each image are taken and placed into blocks, to generate 64 blocks.

FIG. 1A illustrates an exemplary prior art light-field camera, or camera array, which employs an array of two or more objective lenses 110. Each objective lens focuses on a particular region of photosensor 108, or alternatively on a separate photosensor 108. This light-field camera 100 may be viewed as a combination of two or more conventional cameras that each simultaneously records an image of a subject on a particular region of photosensor 108 or alternatively on a particular photosensor 108. The captured images may then be combined to form one image.

FIG. 1B illustrates an exemplary prior art plenoptic camera, another type of light-field camera, that employs a single objective lens and a microlens or lenslet array 106 that includes, for example, about 100,000 lenslets. Lenslet array 106 is typically placed a small distance (˜0.5 mm) from a photosensor 108, e.g. a charge-coupled device (CCD). The raw image captured with a plenoptic camera 102 is made up of an array of small images, typically circular, of the main camera lens 108. These small images may be referred to as microimages. The lenslet array 106 enables the plenoptic camera 102 to capture the light-field, i.e. to record not only image intensity, but also the distribution of intensity in different directions at each point. Each lenslet splits a beam coming to it from the main lens 104 into rays coming from different “pinhole” locations on the aperture of the main lens 108. Each of these rays is recorded as a pixel on photosensor 108, and the pixels under each lenslet collectively form an n-pixel image. This n-pixel area under each lenslet may be referred to as a macropixel, and the camera 102 generates a microimage at each macropixel. The plenoptic photograph captured by a camera 102 with, for example, 100,000 lenslets will contain 100,000 macropixels, and thus generate 100,000 microimages of a subject. See, for example, FIG. 2. By appropriately selecting a pixel from each macropixel, a conventional picture of the subject may be created from the microimages of the subject captured at the macropixels.

Captured light-fields from light-field cameras including plenoptic cameras are commonly saved as a 2D image that contains an array of “tiles” or “microimages”. Compression of light-field images is an important problem for computational photography. Due to the 4D nature of light-fields, and the fact that 2D slices of light-fields are equivalent to conventional pictures, the uncompressed files tend to be big, and may take up to gigabytes of space. At the same time, there is redundancy in the data: all rays starting from a surface point have approximately the same radiance (exactly the same for Lambertian surfaces). Thus, there is motivation for compression of light-field images.

Conventionally, light-field images have been compressed using existing lossy and lossless image/video compression techniques. Some conventional approaches treat the 2D slices in a light-field image as separate images and compress each separately. In others, the 4D light-field image is contained in one 2D image, which is simply compressed by conventional methods as one image. These approaches do not utilize the information and redundancy specific to light-field images, but rather treat them as general images.

Several approaches have been proposed to compress specifically the light-field images. Some conventional methods treat each 2D slice in the 4D light-field image as a frame in a video. In other words, the 2D angular images in the 4D light-field image are used to create a video, and this video is compressed using a video compression method. However, light-field images compressed with light-field specific compression techniques generally require a special viewer to view the light-field images.

JPEG is a common conventional image compression standard. JPEG stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard. JPEG is exemplary of block-based compression techniques. JPEG divides images into 8×8 pixel blocks, or more generally block-based compression techniques divide images into m×n pixel blocks, and compresses these blocks using some transform function. Because of the division of images into blocks, JPEG and other block-based compression techniques are known to have the problem of generating “blocking artifacts”, in which the compressed image appears to be composed of blocks or has other introduced vertical/horizontal artifacts (e.g., vertical or horizontal lines, discontinuities, or streaks).

The JPEG standard and other block-based compression techniques may be used to compress light-field images directly, without consideration for the specifics of light-field data. However, due to the quasi-periodic nature of light-field images, and the blocky nature of the compression, the results tend to be poor, including noticeable blocking artifacts. Such blocking artifacts may severely damage the angular information in the light-field image, and therefore may limit the horizontal and vertical parallax that can be achieved using these images.

FIG. 2 illustrates a light-field image 200 captured with a plenoptic camera, for example a plenoptic camera 102 as illustrated in FIG. 1B. Expanded region 202 from image 200 illustrates that that the light-field image 200 is composed of many individual macropixels, with each macropixel including a circular microimage. Region 202 shows the captured light-field data without compression. Region 204 shows the light-field data from the same area of image 200 after JPEG compression has been applied to image 200. Blocking artifacts introduced by the JPEG compression are clearly visible, for example in the microimages of the 16 macropixels shown in expanded subregion 206. Image 208 shows the same subregion, uncompressed, for comparison.

However, light-fields compressed with conventional light-field-specific methods, as a rule, cannot be opened and viewed with traditional and more general-purpose image viewers. Users that do not have a light-field viewing application would like to be able to preview simple 2D representations of light-fields with conventional image viewers such as those that can view JPEG-compressed images.

SUMMARY

Various embodiments of a method and apparatus for the block-based compression of light-field images are described. Embodiments may preprocess light-field images into a format that is compatible with the blocking scheme of a block-based compression technique, for example the JPEG compression standard, which is to be used to perform actual compression of the light-field images. Embodiments of a method for the block-based compression of light-field images may be implemented as or in a tool, module, library function, plug-in, stand-alone application, etc. For simplicity, implementations of embodiments may be referred to herein as a light-field preprocessing module.

Embodiments of the light-field preprocessing module may convert captured light-field images into a suitable format so that blocking artifacts of block-based compression (e.g., JPEG) are not introduced in the final compressed image. The light-field preprocessing module reshapes the angular data in a captured light-field image into shapes compatible with the blocking scheme of the block-based compression technique being used (e.g., squares of size 8×8, 16×16, etc. for JPEG) so that the resultant light-field image fits the blocking scheme of the compression technique. For example, if JPEG is used, JPEG block boundaries become natural boundaries of the angular images in the light-field.

Embodiments may produce compressed 2D images for which no specific light-field image viewer is needed to preview the full light-field image. Full light-field information is contained in one 2D image, which may be compressed by a conventional block-based compression technique (e.g., JPEG) in a fast and robust way, and the final compressed image does not contain blocking artifacts that may result if the light-field is compressed without the pre-processing as described herein. In other words, embodiments provide high performance compression with no blocking artifacts in the final compressed light-field.

In embodiments, a captured light-field image is obtained by the light-field preprocessing module. The captured light-field image is preprocessed by the light-field preprocessing module to generate a preprocessed light-field image with a block size and shape that is compatible with the block-based compression technique that is to be used to compress the light-field image. In one embodiment, if a calibration image for the light-field camera is available, a light-field image captured by the camera may be normalized using the calibration image. The preprocessed light-field image is then compressed by a compression engine that implements the block-based compression technique to generate a compressed light-field image. The compressed light-field image may, for example, be stored to a storage medium, such as system memory, a disk drive, DVD, CD, etc. The compressed light-field image may be viewed or otherwise manipulated using any application that is configured to open and view images generated by the block-based compression technique. For example, if JPEG compression is used, the compressed light-field image may be viewed using any application that is capable of opening and displaying JPEG files.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates an exemplary prior art light-field camera, or camera array, which employs an array of two or more objective lenses.

FIG. 1B illustrates an exemplary prior art plenoptic camera that employs a single objective lens and a microlens array.

FIG. 2 illustrates a light-field image captured with a plenoptic camera, for example a plenoptic camera as illustrated in FIG. 1B, and shows blocking artifacts that may result when compressing the raw image with a block-based compression technique.

FIGS. 3A and 3B illustrate preprocessing of an exemplary light-field image prior to compression using a block-based compression technique, according to one embodiment.

FIG. 4 illustrates an exemplary light-field image captured with a plenoptic camera, for example a plenoptic camera as illustrated in FIG. 1B.

FIG. 5 is a high-level block diagram that shows data flow in a light-field preprocessing and compression method, according to one embodiment.

FIG. 6 is a flowchart of a method for the preprocessing of macropixels or blocks from a light-field image prior to block-based compression of the light-field image, according to one embodiment.

FIG. 7 illustrates an exemplary calibration image for a plenoptic light-field camera.

FIG. 8A illustrates an exemplary interpolation method using Laplacian interpolation according to one embodiment.

FIG. 8B illustrates an exemplary convolution kernel that may be used in embodiments.

FIG. 9A illustrates the preprocessing of light-field images that are captured with light-field imaging systems where microlenses are used behind the main lens, such as the plenoptic camera of FIG. 1B, according to one embodiment.

FIG. 9B illustrates the preprocessing of light-field images that are captured with light-field imaging systems such as the light-field camera of FIG. 1A, according to one embodiment.

FIG. 10 illustrates an exemplary computer system that may be used in embodiments.

While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.

DETAILED DESCRIPTION OF EMBODIMENTS

Various embodiments of a method and apparatus for the block-based compression of light-field images are described. Embodiments may preprocess light-field images into a format that is compatible with the blocking scheme of a block-based compression technique, for example the JPEG compression standard, which is to be used to perform actual compression of the light-field images. Embodiments of a method for the block-based compression of light-field images may be implemented as or in a tool, module, library function, plug-in, stand-alone application, etc. For simplicity, implementations of embodiments may be referred to herein as a light-field preprocessing module.

Embodiments of the light-field preprocessing module may convert captured light-field images into a suitable format so that blocking artifacts of block-based compression (e.g., JPEG) are not introduced in the final compressed image. The light-field preprocessing module reshapes the angular data in a light-field into shapes compatible with the blocking scheme of the block-based compression technique being used (e.g., squares of size 8×8, 16×16, etc. for JPEG) so that the resultant light-field image fits the blocking scheme of the compression technique. For example, if JPEG is used, JPEG block boundaries become natural boundaries of the angular images in the light-field.

Embodiments may produce compressed 2D images for which no specific light-field image viewer is needed to preview the full light-field image. Full light-field information is contained in one 2D image, which is compressed by a conventional block-based compression technique (e.g., JPEG) in a fast and robust way, and the final compressed image does not contain blocking artifacts that may result if the light-field is compressed without the pre-processing as described herein. In other words, embodiments provide high performance compression with no blocking artifacts in the final compressed light-field.

For simplicity, embodiments are generally described herein as using the JPEG compression standard as the block-based compression technique that compresses the preprocessed light-field images generated by embodiments of the light-field preprocessing module. Compressed light-field images generated by embodiments that use the JPEG compression standard are backward compatible with conventional JPEG standards. Embodiments using JPEG compression may achieve good quality compression of light-field images, while also making it possible for the compressed light-fields to be viewed as simple 2D pictures with any application that can open and display JPEG (.jpg) files. When JPEG compression is used, the compressed light-fields may be output as 2D JPEG (.jpg) files, and may thus be viewed with any application that can open and display .jpg files. However, it is to be understood that embodiments are not limited to the JPEG compression standard as the block-based compression technique, but could be applied to any block-based compression technique.

FIGS. 3A and 3B illustrate preprocessing of an exemplary light-field image prior to compression using a block-based compression technique, according to one embodiment. FIG. 3A shows an exemplary 4-D light-field 300 as captured by a light-field camera such as camera 100 of FIG. 1. Note that the 4D light-field 300 is a 2D array of 2D images (views from different centers of projection). These 2D images may be referred to as microimages. Note that the information in each microimage is rectangular. In this example, the array is 6×6, so there are 36 individual images, or microimages, in light-field 300.

Let pixel locations in a given 2D microimage (e.g., microimage 302) be (i,j), where i=1 . . . N and j=1 . . . M, where N is the number of rows of pixels and M is the number of columns of pixels in the 2D microimage. Pixel (i,j) from each of the 36 microimages is taken and put into a block B_(ij) (see block 304). If there are m horizontal images and n vertical images in light-field 300, this block would initially be n×m pixels. In this example, the block would be 6×6 pixels. Furthermore, there are N×M blocks 304. These N×M blocks 304 are to be put into one image, so that all of the angular and spatial information of the light-field is contained in that one image (see image 310 of FIG. 3B). The size in pixels of this resulting image, if the original blocks 304 of dimension n×m are used, would be (N×n)×(M×m).

However, as noted, the block size n×m may not be directly compatible with the blocking scheme of a block-based compression technique such as JPEG. In this example, the block size of 6×6 pixels is not directly compatible with JPEG's typical compression blocking size, which is 8×8 pixels. Therefore, embodiments of the lightfield preprocessing module as described herein may pre-process the blocks 304, as indicated at 306 of FIG. 3B, to produce blocks 308 of a dimension n′×m′ that is compatible with the blocking scheme of the block-based compression technique. In this example, the blocks 304 are resized to 8×8 pixels to be compatible with JPEG's blocking scheme. The resized N×M blocks 308 may then be placed into an image 310. The size in pixels of this image 310 is (N×n′)×(M×m′). Image 310 may then be compressed with the block-based compression technique without producing blocking artifacts that would result if the blocks 304 of the original, non-compatible dimensions were used in image 310.

In this example, the block size n×m of blocks 304 is 6×6, which is smaller than the block size of the block-based compression technique (8×8). In such cases, the pixel information in the original blocks 304 or regions may be interpolated to fill the pixel values in the new, larger blocks 308. Any of various interpolation techniques may be used. In one embodiment, for example, Laplacian interpolation may be used.

It could also be the case in some light-field images that n×m (the default or “raw” block size) is larger than the block size used by the block-based compression technique. Furthermore, n is not necessarily equal to m. For example, n×m may be 11×14, or 11×11, or 9×9, or 8×10, or 21×21, and so on. In some block-based compression techniques, such as JPEG, the blocking scheme may allow for multiples of a base blocking size. For example, JPEG may allow for block sizes that are multiples of 8, such as 8×8, 16×16, 32×32, and so on. Thus, in one embodiment, a next larger block size provided by the block-based compression technique may be used for the block size of blocks 308. For example, if n×m is 12×14, and the block-based compression technique allows for 8×8 or 16×16 block sizes, 16×16 may be used for size n′×m′ of blocks 308.

Alternatively, blocks 306 may simply be cropped to produce smaller blocks 308 if n′×m′ is smaller than n×m. For example, if n×m is 10×10, and n′×m′ is 8×8, blocks 306 may simply be cropped to 8×8. Note that, in some light-field images, the edge information in the microimages may be noisy in any case due to the nature of the light-field camera used to capture the light-field information, so cropping edge pixels may be performed without losing much usable light-field information. Note also that the larger the microimage in pixels, the less negative effect (loss of light-field information) will result from cropping. Thus, cropping may not be used on microimages that include a limited number of pixels, where the light-field information in each pixel is relatively more valuable than that in each pixel of a microimage with more pixels.

The above describes a process whereby the blocks 304 are resized by the light-field preprocessing module into blocks 308 that are sized in accordance with the blocking scheme of the block-based compression technique before being placed into image 310. Alternatively, an image may be formed from blocks 304 of the original dimension (n×m), and then the light-field preprocessing module may iterate through the blocks 304 in the image, resizing each block to form a new image 310 composed of blocks 308 sized in accordance with the blocking scheme of the block-based compression technique.

In some light-field images, rather than each microimage being a rectangle as illustrated in FIGS. 3A and 3B, the recorded information is a circle or disk representing the camera aperture (referred to as a microimage) in each block or macropixel. FIG. 4 illustrates an exemplary light-field image 400 captured with a plenoptic camera, for example a plenoptic camera 102 as illustrated in FIG. 1B. Region 402 shows an expanded region of light-field image 400, and macropixel 404 from the expanded region 402 shows an exemplary circular microimage. In one embodiment, rather than simply resizing each macropixel 404 as in the case with image 300 of FIG. 3A, the light-field preprocessing module first reshapes the circular microimage to a rectangular area or block, for example by cropping, and then resizes the resultant block to be compatible with the blocking scheme of the block-based compression technique (e.g., to an 8×8 block for JPEG compression). Pixel information in the block may be interpolated to generate pixel values in the new block, if necessary. Different methods may be applied to make the block of a size that is compatible with the blocking scheme of the block-based compression technique. For example, assume JPEG compression is being used. If the cropped area from the microimage (the block) is smaller than 8×8, the block is resized to 8×8, with interpolation used to generate the pixel values. If the block is larger than 8×8 but smaller than 16×16, the block may either be resized down to 8×8, for example by cropping, or resized to 16×16, with interpolation used to generate the pixel values.

Once the microimages are cropped, and the cropped blocks are resized into blocks of a size that is compatible with the blocking scheme of the block-based compression technique, the resized blocks may be placed into an image similar to image 310 of FIG. 3B. The angular and spatial information of the light-field is contained in the resultant image. The resultant image may then be compressed using the block-based compression technique without generating blocking artifacts, as the block size of the resultant image is the same as the block size used in the blocking scheme of the block-based compression technique.

FIG. 5 is a high-level block diagram that shows data flow in a light-field preprocessing and compression method, according to one embodiment. A captured light-field image 500 (e.g., image 300 of FIG. 3A or image 400 of FIG. 4) is obtained by the light-field preprocessing module 502. Image 500 is preprocessed by the light-field preprocessing module 502 to generate a preprocessed light-field image 504 with a block size that is compatible with the block-based compression technique that is to be used to compress image 504. In one embodiment, if a calibration image 501 for the light-field camera is available, a light-field image 500 captured by the camera may be normalized using the calibration image. The captured light-field image is typically divided by the calibration image to normalize the image. Image 504 is then compressed by a compression engine 506 that implements the block-based compression technique to generate a compressed light-field image 508. Compressed image 508 may, for example, be stored to a storage medium 510, such as system memory, a disk drive, DVD, CD, etc. Compressed light-field image 508 may be viewed or otherwise manipulated using any application that is configured to open and view images generated by the block-based compression technique. For example, if JPEG compression is used, image 508 may be viewed using any application that is capable of opening and displaying JPEG files.

Embodiments of a light-field preprocessing module 502 and a compression engine 506 may be implemented on a computer system. An exemplary system on which embodiments may be implemented is illustrated in FIG. 10. Light-field preprocessing module 502 may be implemented as or in a tool, module, library function, plug-in, stand-alone application, etc. Light-field preprocessing module 502 may provide a user interface that provides one or more textual and/or graphical user interface elements, modes or techniques via which a user may control various aspects of the preprocessing of light-field images. For example, the user interface may include user interface elements that allow a user to select input and output files, to specify the compression technique to be used, to specify the block size for the preprocessed image 504, to specify whether the blocks are to be scaled up (interpolated) or down (cropped), and so on.

FIGS. 6 through 9 illustrate in more detail embodiments of a method for the preprocessing of light-field images prior to block-based compression of the images, specifically as applied to images such as image 400 of FIG. 4 in which each macropixel includes a circular microimage. Note, however, that at least some of the preprocessing illustrated in and described for these Figures may also be applied in the preprocessing of images such as image 300 of FIG. 3A in which each macropixel is a rectangular microimage. These Figures assume by way of example that the block-based compression is to be performed according to the JPEG compression standard, and that that the block size of the blocking scheme used in the JPEG compression is 8×8 pixels. These Figures also assume by way of example that a portion of the microimage is to be extracted and scaled or interpolated to fit a larger block, and that a Laplacian interpolation technique is to be employed. In various embodiments, other block-based compression techniques than JPEG may be used, other block sizes than 8×8 pixels may be used, and other methods of scaling up including other interpolation techniques may be used. Note that, in one embodiment, scaling down to fit a smaller block size may be performed by simply cropping the input microimages.

FIG. 6 is a flowchart of a method for the preprocessing of macropixels or blocks from a light-field image prior to block-based compression of the light-field image, according to one embodiment. The method illustrated in FIG. 6 may be implemented in a light-field preprocessing module such as module 502 of FIG. 5.

The light-field preprocessing module 502 may obtain a first light-field image block 602, or macropixel, from the light-field image 500 to be preprocessed. In this example, the exemplary block 602 is approximately 20×20 pixels. Embodiments of the light-field preprocessing module, however, may be configured to work with light-field image blocks 602 of various sizes, and the blocks 602 are not necessarily square, or even necessarily rectangular, as embodiments of the preprocessing method will work with input blocks of other shapes, such as hexagonal shapes. In this example, light-field information from the microimage in block 602, which is rectangular and approximately 20×20 pixels, needs to be fit into an 8×8 pixel block for compression using a block-based compression technique, e.g. JPEG.

In one embodiment, if a calibration image 501 for the light-field camera is available, a light-field image 500 captured by the camera may be normalized using the calibration image. The captured light-field image is typically divided by the calibration image to normalize the image. Thus, in one embodiment, the light-field image block 602 may be normalized by dividing the block 602 by a corresponding calibration block 600 from a calibration image 501 captured with the light-field camera, as indicated at 604. In preprocessing captured light-field image 500, each block 602 in image 502 may be normalized by dividing the captured light-field block 602 by a corresponding calibration block 600 from the calibration image 501. In one embodiment, rather than normalizing the entire block 602, only a region encompassing the circular microimage may be normalized.

FIG. 7 illustrates an exemplary calibration image for a plenoptic light-field camera. The calibration image 700 is an image of an all-white scene taken by the light-field camera, in this example by a plenoptic camera such as camera 102 of FIG. 1B. Referring to camera 102, the large circle in calibration image 700 corresponds to the aperture of the objective lens 104, and each small circle or microimage within the large circle corresponds to the aperture of a particular one of the microlenses or lenslets within microlens array 106. The normalization procedure may improve the quality at the boundary of each microlens aperture circle, and enhances the overall appearance of the light-field image, removing color bias that may be introduced by the light-field apparatus (the camera). The color bias is at the edges of the microimages, and is due to attenuation of the microlenses at the boundaries. Region 702 shows an exemplary expanded region from calibration image 700, and macropixel 704 shows an exemplary expanded macropixel or block from region 702 and its circular microimage.

After normalization, if performed, the block 602 is reshaped so that a rectangular area of light-field information is obtained. In some light-field images 500, such as those captured by a plenoptic camera 102 as illustrated in FIG. 1B, the recorded light-field information is a disk or circle (representing camera aperture) in each block 602, referred to as a microimage. This circular light-field information needs to be reshaped to a rectangular area of a size that is compatible with the blocking scheme of the block-based compression technique. In one embodiment, this may be accomplished by cropping the microimage in block 602 to obtain a smaller block, as indicated at 606. In this example, cropping 606 results in a 5×5 block 608 of light-field information. At 610, the cropped block 608 is then resized to the block size to be used by the compression technique, in this example 8×8, and an interpolation technique is applied to fill in the pixel values in the 8×8 block, to generate resized block 612. In one embodiment, a Laplacian interpolation technique may be used in which the Laplace equation is solved to determine the pixel values. The resized block 612 is created in or placed into a corresponding location of a preprocessed light-field image 504. At 614, if there are more light-field image blocks to be preprocessed, the method obtains a next image block 602 from captured light-field image 500 and continues. Otherwise, the preprocessing of the light-field image 500 is done. Referring to FIG. 5, the preprocessing of the captured light-field image 500 by light-field preprocessing module 502 is done, and a preprocessed light-field image 504 is output for compression by compression engine 506.

Referring again to FIG. 6, the size of the cropped block 608 may be different than 5×5, which is used by way of example, and the resizing process may be different depending on the crop size used. For example, assume JPEG compression is being used. If the cropped area from the microimage (e.g., block 608) is smaller than 8×8, the block may be resized to 8×8, with interpolation used to generate the pixel values. If the block 608 is larger than 8×8 but smaller than 16×16, the block may either be resized down to 8×8 or resized up to 16×16, with interpolation used to generate the pixel values.

In one embodiment, the interpolation technique used by the light-field preprocessing module 502 may be a Laplace solver. FIGS. 8A and 8B illustrate an exemplary interpolation method using Laplacian interpolation according to one embodiment. The goal of interpolation is to populate the black region between region 806, which was cropped, at 802, from macropixel 800, and the outer boundary of block 804 using the pixel values inside the cropped region 806. In this example, region 806 is a 5×5 pixel square, and block 804 is an 8×8 pixel square, but note that either or both may be of different shapes or dimensions. One embodiment may use Dirichlet boundary conditions 810 at the boundaries of the cropped region 806, and Neuman boundary conditions 812 at the boundaries of the block 804. It is well known that solving the Laplace equation with these boundary conditions may be achieved by iterating over this block by convolving with an appropriate kernel, as indicated at 814, to generate an output block 816 (in this example, an 8×8 output block). FIG. 8B illustrates an exemplary convolution kernel that may be used in embodiments. In this embodiment, convolution starts from the boundaries of the cropped region 806, thus filling the black regions by propagating information from inside out. Generally, approximately three to four iterations are enough to fill the entire block 804.

FIGS. 9A and 9B illustrate the preprocessing of light-field images according to one embodiment. FIG. 9A illustrates the preprocessing of light-field images, such as exemplary image 400 in FIG. 4, that are captured with light-field imaging systems where microlenses are used behind the main lens, such as plenoptic camera 102 of FIG. 1B, according to one embodiment. FIG. 9B illustrates the preprocessing of light-field images, such as exemplary image 300 in FIG. 3, that are captured with light-field imaging systems such as light-field camera 100 of FIG. 1A, according to one embodiment. Embodiments of the light-field preprocessing module may be configured to preprocess one or both types of light-field images.

Referring to FIG. 9A, elements 902, 904, and 906 may be performed by the light-field preprocessing module in preprocessing light-field images, such as exemplary image 400 in FIG. 4, that are captured with light-field imaging systems where microlenses are used behind the main lens, such as plenoptic camera 102 of FIG. 1B. These elements may be performed to detect and extract the individual microlens images from a light-field image 900 captured with a light-field imaging system such as plenoptic camera 102 of FIG. 1B. Exemplary light-field image 900 is a 2D image consisting of multiple microlens images. Each microlens image is the image of the aperture of the main (objective) lens seen from a different angle. In one embodiment, a microimage detection method may be used by the light-field preprocessing module to extract the individual microlens images (microimages) from light-field image 900. In the microimage detection method, the light-field preprocessing module detects the first microimage, as indicated at 902, and then estimates the period of the microimages, as indicated at 904. In one embodiment, this may be done by taking the average of the pixel values in vertical and horizontal directions, then taking the autocorrelation of these average values, and finally looking at the distances of the first peak from the zero shift in the autocorrelations. These values give the approximate vertical and horizontal distances between microimages. The light-field preprocessing module then takes the coordinates of the microimages at the top-left corner, and then by iterating in the image, extracts each microimage, as indicated at 906. The size of the microlens blocks (i.e., macropixels) is set to half of the period of the microimages. Then, for each extracted microimage, normalization may be optionally performed, as indicated at 908, and resizing and, if necessary, interpolation is performed, as indicated at 910, to generate a preprocessed light-field image 912.

In one embodiment, rather than iterating the image 900 and extracting all microimages and then preprocessing the extracted microimages as indicated at 908 and 910, the light-field preprocessing module may be configured to extract a next microimage, preprocess the extracted microimage as indicated at 908 and 910, and repeat the extraction and preprocessing for each microimage until all microimages in image 900 are extracted and preprocessed.

FIG. 9B illustrates the preprocessing of light-field images, such as exemplary image 300 in FIG. 3, that are captured with light-field imaging systems such as light-field camera 100 of FIG. 1A, according to one embodiment. In these images, there are no circular microimages in each macropixel of the input captured light-field image 920. Essentially, each macropixel in the captured light-field image 920 is a microimage. For these types of images, normalization of the macropixel may be optionally performed, as indicated at 922. Blocks of n×m pixels are formed from the macropixels, as indicated at 924, for example as described in reference to FIGS. 3A and 3B. Resizing and, if necessary, interpolation is performed on the blocks, as indicated at 926, to generate blocks of n′×m′ pixels compatible with the blocking scheme of the block-based compression technique. All of the blocks extracted from the image 920 are processed thusly to generate a preprocessed light-field image 928.

Preprocessed light-field image 912 of FIG. 9A and preprocessed light-field image 928 of FIG. 9B may then be compressed using a block-based compression technique, such as JPEG compression. Since the preprocessing performed by the light-field preprocessing module has resized the blocks in the preprocessed light-field images to a size (and shape) that is compatible with the blocking scheme used by the compression technique, the resultant compressed images would not have blocking artifacts, as they would if they were directly compressed without preprocessing as described herein.

Exemplary System

Various embodiments of a light-field preprocessing module may be executed on one or more computer systems, which may interact with various other devices. One such computer system is illustrated by FIG. 10. In the illustrated embodiment, computer system 1000 includes one or more processors 1010 coupled to a system memory 1020 via an input/output (I/O) interface 1030. Computer system 1000 further includes a network interface 1040 coupled to I/O interface 1030, and one or more input/output devices 1050, such as cursor control device 1060, keyboard 1070, audio device 1090, and display(s) 1080. In some embodiments, it is contemplated that embodiments may be implemented using a single instance of computer system 1000, while in other embodiments multiple such systems, or multiple nodes making up computer system 1000, may be configured to host different portions or instances of embodiments. For example, in one embodiment some elements may be implemented via one or more nodes of computer system 1000 that are distinct from those nodes implementing other elements.

In various embodiments, computer system 1000 may be a uniprocessor system including one processor 1010, or a multiprocessor system including several processors 1010 (e.g., two, four, eight, or another suitable number). Processors 1010 may be any suitable processor capable of executing instructions. For example, in various embodiments, processors 1010 may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors 1010 may commonly, but not necessarily, implement the same ISA.

System memory 1020 may be configured to store program instructions and/or data accessible by processor 1010. In various embodiments, system memory 1020 may be implemented using any suitable memory technology, such as static random access memory (SRAM), synchronous dynamic RAM (SDRAM), nonvolatile/Flash-type memory, or any other type of memory. In the illustrated embodiment, program instructions and data implementing desired functions, such as those described above for the preprocessing of light-field images for compression with a block-based compression technique, are shown stored within system memory 1020 as program instructions 1025 and data storage 1035, respectively. In other embodiments, program instructions and/or data may be received, sent or stored upon different types of computer-accessible media or on similar media separate from system memory 1020 or computer system 1000. Generally speaking, a computer-accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or CD/DVD-ROM coupled to computer system 1000 via I/O interface 1030. Program instructions and data stored via a computer-accessible medium may be transmitted by transmission media or signals such as electrical, electromagnetic, or digital signals, which may be conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via network interface 1040.

In one embodiment, I/O interface 1030 may be configured to coordinate I/O traffic between processor 1010, system memory 1020, and any peripheral devices in the device, including network interface 1040 or other peripheral interfaces, such as input/output devices 1050. In some embodiments, I/O interface 1030 may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory 1020) into a format suitable for use by another component (e.g., processor 1010). In some embodiments, I/O interface 1030 may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface 1030 may be split into two or more separate components, such as a north bridge and a south bridge, for example. In addition, in some embodiments some or all of the functionality of I/O interface 1030, such as an interface to system memory 1020, may be incorporated directly into processor 1010.

Network interface 1040 may be configured to allow data to be exchanged between computer system 1000 and other devices attached to a network, such as other computer systems, or between nodes of computer system 1000. In various embodiments, network interface 1040 may support communication via wired or wireless general data networks, such as any suitable type of Ethernet network, for example; via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks; via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol.

Input/output devices 1050 may, in some embodiments, include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or optical recognition devices, or any other devices suitable for entering or retrieving data by one or more computer system 1000. Multiple input/output devices 1050 may be present in computer system 1000 or may be distributed on various nodes of computer system 1000. In some embodiments, similar input/output devices may be separate from computer system 1000 and may interact with one or more nodes of computer system 1000 through a wired or wireless connection, such as over network interface 1040.

As shown in FIG. 10, memory 1020 may include program instructions 1025, configured to implement embodiments of a light-field preprocessing module, and data storage 1035, comprising various data accessible by program instructions 1025. In one embodiment, program instructions 1025 may include software elements of a light-field preprocessing module and a block-based compression engine as illustrated in the above Figures. Data storage 1035 may include data that may be used in embodiments. In other embodiments, other or different software elements and data may be included.

Those skilled in the art will appreciate that computer system 1000 is merely illustrative and is not intended to limit the scope of embodiments of a light-field preprocessing module as described herein. In particular, the computer system and devices may include any combination of hardware or software that can perform the indicated functions, including computers, network devices, internet appliances, PDAs, wireless phones, pagers, etc. Computer system 1000 may also be connected to other devices that are not illustrated, or instead may operate as a stand-alone system. In addition, the functionality provided by the illustrated components may in some embodiments be combined in fewer components or distributed in additional components. Similarly, in some embodiments, the functionality of some of the illustrated components may not be provided and/or other additional functionality may be available.

Those skilled in the art will also appreciate that, while various items are illustrated as being stored in memory or on storage while being used, these items or portions of them may be transferred between memory and other storage devices for purposes of memory management and data integrity. Alternatively, in other embodiments some or all of the software components may execute in memory on another device and communicate with the illustrated computer system via inter-computer communication. Some or all of the system components or data structures may also be stored (e.g., as instructions or structured data) on a computer-accessible medium or a portable article to be read by an appropriate drive, various examples of which are described above. In some embodiments, instructions stored on a computer-accessible medium separate from computer system 1000 may be transmitted to computer system 1000 via transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as a network and/or a wireless link. Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Accordingly, the present invention may be practiced with other computer system configurations.

CONCLUSION

Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Generally speaking, a computer-accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR, RDRAM, SRAM, etc.), ROM, etc. As well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link.

The various methods as illustrated in the Figures and described herein represent exemplary embodiments of methods. The methods may be implemented in software, hardware, or a combination thereof. The order of method may be changed, and various elements may be added, reordered, combined, omitted, modified, etc.

Various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended that the invention embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense. 

1. A method, comprising: processing, by one or more computing devices, a light-field image to generate a processed light-field image, wherein the light-field image comprises a plurality of microimages, wherein dimensions of the microimages are different than blocking dimensions used by an image processing technique, and wherein said processing comprises: estimating a microimage period for the light field image, wherein the microimage period indicates vertical and horizontal distances between the microimages in the light field image; locating each microimage in the light field image according to the microimage period; at each located microimage, extracting a microimage block from the light field image according to the microimage period; resizing each extracted microimage block according to the blocking dimensions; and storing each resized microimage block to a respective location in the processed light-field image according to the blocking dimensions.
 2. The method as recited in claim 1, wherein the light-field image is captured with a plenoptic camera comprising an objective lens, a photosensor, and a microlens array comprising a plurality of microlenses located between the objective lens and the photosensor, wherein the plurality of microimages each correspond to one of the plurality of microlenses in the microlens array.
 3. The method as recited in claim 1, wherein extracting a microimage block from the light field image according to the microimage period comprises cropping the respective located microimage to generate the microimage block, wherein vertical and horizontal dimensions of the microimage block are less than the vertical and horizontal dimensions of the microimage period.
 4. The method as recited in claim 1, further comprising normalizing each microimage according to a corresponding region of a calibration image prior to said resizing.
 5. The method as recited in claim 1, further comprising applying an interpolation technique to each resized microimage block.
 6. The method as recited in claim 1, wherein said estimating a microimage period for the light field image comprises: determining an average of pixel values in vertical and horizontal directions in the light-field image; determining an autocorrelation of the average pixel values in the vertical and horizontal directions; and determining the vertical and the horizontal distances between the microimages in the light field image according to the autocorrelations.
 7. The method as recited in claim 1, wherein the image processing technique is a block-based compression technique, and wherein the method further comprises compressing the processed light-field image in accordance with the block-based compression technique to generate a compressed light-field image.
 8. The method as recited in claim 7, wherein the block-based compression technique compresses the preprocessed light-field image in accordance with the JPEG (Joint Photographic Experts Group) compression standard.
 9. The method as recited in claim 7, wherein the compressed light-field image is viewable using any application that is capable of accessing files compressed using the block-based compression technique.
 10. The method as recited in claim 1, wherein the dimensions of the blocks in the processed light-field image are eight pixels by eight pixels.
 11. The method as recited in claim 1, further comprising, prior to said processing the light-field image to generate a processed light-field image, normalizing the light-field image in accordance with a calibration image.
 12. A system, comprising: one or more processors; and a memory comprising program instructions, wherein the program instructions are executable by at least one of the one or more processors to process a light-field image to generate a processed light-field image, wherein the light-field image comprises a plurality of microimages, wherein dimensions of the microimages are different than blocking dimensions used by an image processing technique, wherein, to process the light-field image, the program instructions are executable by at least one of the one or more processors to: estimate a microimage period for the light field image, wherein the microimage period indicates vertical and horizontal distances between the microimages in the light field image; locate each microimage in the light field image according to the microimage period; at each located microimage, extract a microimage block from the light field image according to the microimage period; resize each extracted microimage block according to the blocking dimensions; and store each resized microimage block to a respective location in the processed light-field image according to the blocking dimensions.
 13. The system as recited in claim 12, wherein, to extract a microimage block from the light field image according to the microimage period, the program instructions are executable by at least one of the one or more processors to crop the respective located microimage to generate the microimage block, wherein vertical and horizontal dimensions of the microimage block are less than the vertical and horizontal dimensions of the microimage period.
 14. The system as recited in claim 12, wherein the program instructions are executable by at least one of the one or more processors to normalize each microimage according to a corresponding region of a calibration image prior to said resizing.
 15. The system as recited in claim 12, wherein, to estimate a microimage period for the light field image, the program instructions are executable by at least one of the one or more processors to: determine an average of pixel values in vertical and horizontal directions in the light-field image; determine an autocorrelation of the average pixel values in the vertical and horizontal directions; and determine the vertical and the horizontal distances between the microimages in the light field image according to the autocorrelations.
 16. The system as recited in claim 12, wherein the image processing technique is a block-based compression technique, and wherein the program instructions are executable by at least one of the one or more processors to compress the processed light-field image in accordance with the block-based compression technique to generate a compressed light-field image.
 17. A non-transitory computer-readable storage medium storing program instructions, wherein the program instructions are computer-executable to implement: processing a light-field image to generate a processed light-field image, wherein the light-field image comprises a plurality of microimages, wherein dimensions of the microimages are different than blocking dimensions used by an image processing technique, and wherein, in said processing the light-field image, the program instructions are computer-executable to implement: estimating a microimage period for the light field image, wherein the microimage period indicates vertical and horizontal distances between the microimages in the light field image; locating each microimage in the light field image according to the microimage period; at each located microimage, extracting a microimage block from the light field image according to the microimage period; resizing each extracted microimage block according to the blocking dimensions; and storing each resized microimage block to a respective location in the processed light-field image according to the blocking dimensions.
 18. The non-transitory computer-readable storage medium as recited in claim 17, wherein, in said extracting a microimage block from the light field image according to the microimage period, the program instructions are computer-executable to implement cropping the respective located microimage to generate the microimage block, wherein vertical and horizontal dimensions of the microimage block are less than the vertical and horizontal dimensions of the microimage period.
 19. The non-transitory computer-readable storage medium as recited in claim 17, wherein, in said estimating a microimage period for the light field image, the program instructions are computer-executable to implement: determining an average of pixel values in vertical and horizontal directions in the light-field image; determining an autocorrelation of the average pixel values in the vertical and horizontal directions; and determining the vertical and the horizontal distances between the microimages in the light field image according to the autocorrelations.
 20. The non-transitory computer-readable storage medium as recited in claim 17, wherein the image processing technique is a block-based compression technique, and wherein the program instructions are computer-executable to implement compressing the processed light-field image in accordance with the block-based compression technique to generate a compressed light-field image. 